#include "BaseLayout.h"
#include "LayoutParameter.h"

#include <string>

class DIVA_VM;


class binarytreeLayout : public BaseLayout{

public:
	binarytreeLayout();
	virtual void ImportParameter(std::string json);
	void doLayout();
protected:
	virtual void doInitialize();
	virtual void doDeinitialize();

private:
	int countLevel(DIVA_VM* node, int level);
	void setPos(DIVA_VM* node, int level);

	DIVA_VM* _rootVM;
	std::string _root;
	std::string _left;
	std::string _right;
	int _level;
	int _maxlevel;
	float _xsize;
	float _ysize;
	Ogre::Vector3 _rootpos;

};